<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>有货</title>

    <!-- Bootstrap --> 
    <!-- <link href="css/bootstrap.min.css" rel="stylesheet"> -->
    <link rel="stylesheet" href="./Public/Home/bootstrap-3.3.5/css/bootstrap.min.css">

	<!-- 可选的Bootstrap主题文件（一般不用引入） -->
	<link rel="stylesheet" href="./Public/Home/bootstrap-3.3.5/css/bootstrap-theme.min.css">
    <script src="./Public/Home/jquery-1.11.3/jquery.min.js"></script>
	<link rel="stylesheet" href="./Public/Home/Css/index.css">
	<link rel="stylesheet" href="./Public/Home/Css/common.css">
	<script type="text/javascript" src="./Public/Home/Js/index.js"></script>
	<link rel="stylesheet" href="./Public/Home/Css/list.css">
	<script type="text/javascript" src="./Public/Home/Js/list.js"></script>
</head>
<body>
 {{include file="../Common/header"}}
<!-- 中部内容 -->
<article>
<!-- 中间顶部图片及内容 -->
	<div id="_content-top">
		<div class="banner-img" style="background: url('./Public/Home/Images/listtop.jpg');">
			<div class="opt-wrap">
				<p class="opt">
					<a href="">
						<span class="iconfont"></span>
						品牌首页
					</a>
					<a href="">
						<span class="iconfont"></span>
						品牌介绍
					</a>
					<a href="">
						<span class="iconfont"></span>
					</a>
				</p>
			</div>
		</div>
	</div>
<!-- 中间部分内容 -->
	<div id="content-all">
		<div id="_list-top">
			<a href="">BOYS首页</a>
			<span>></span>
			<a href="">BOYS首页</a>
			<span>></span>
		</div>
		<div id="_list-left">
			<div class="sort-container">
				<ul>
					<li>
						<a href="" title="全部品类">全部品类</a>
					</li>
					<div class="row clearfix">
						<div class="col-md-12 column">
							<div class="panel-group" id="panel-988674">
								{{foreach from="$NewData" key="$key" value="$v"}}
									<div class="panel panel-default _woke">
										<div class="panel-heading _wook">
											<span class="caret"></span>
											 <a class="panel-title collapsed " data-toggle="collapse" data-parent="" href="#panel-element-{{$key}}">{{$key}}</a>
										</div>
										<div id="panel-element-{{$key}}" class="panel-collapse collapse _collapse">
											{{foreach from="$v" value="$vv"}}
											<div class="panel-body _wokao">
												<a href="">{{$vv}}</a>
											</div>
											{{endforeach}}
										</div>
									</div>
								{{endforeach}}
							</div>
						</div>
					</div>
				</ul>
			</div>
			<div id="brand-ad">
				<a href=""><img src="./Public/Home/Images/list/1.jpg" alt=""></a>
				<a href=""><img src="./Public/Home/Images/list/2.jpg" alt=""></a>
				<a href=""><img src="./Public/Home/Images/list/3.jpg" alt=""></a>
			</div>
		</div>
		<!-- 右边下的大块内容 -->
		<div id="list-right">
			<!-- 筛选条件 -->
			<div class="shop-entry-area">
				<div class="shop-entry">
					<span class="title">已选条件:</span>
					<div class="attr-content" id="attr_content">
						
					</div>
				</div>
			</div>
			<!-- 这是为了添加商品品牌用的，可以不需要跟他们混合在一起 -->
			<div class="addColor">
				<div class="sex-entry">
					<span class="title">品牌:</span>
					{{foreach from="$brandData" value="$v"}}
					<div class="sex-content" bname="{{$v}}" gids="{{$gids}}"> 
						<a href="javascript:;" class="tag brand">{{$v}}</a>
					</div>
					{{endforeach}}
				</div>
			</div>
			<!-- 这儿是处理商品品牌问题的 -->
			<script type="text/javascript">
				$(function(){
					$(".brand").click(function(){
						var bname = $(this).closest(".sex-content").attr("bname");
						var gids = $(this).closest(".sex-content").attr("gids");//目的是为了在异步方法里面做判断
						// console.log(data);
						var gtvalue = $(this).closest(".sex-content").attr("gtvalue");
						// console.log(gtvalue);
						$.ajax({
							type:"post",
							url:"{{U('getBrandAjax')}}",
							data:{bname:bname,gids:gids,gtvalue:gtvalue},
							dataType:"json",
							success:function(temp){
								// console.log(temp.bname);
									var attr = '';
										attr += '<a href="javascript:;" class="tag closes">'+temp.bname+'<i class="close">×</i></a>';
									var spec = '';
									$.each(temp.GoodsData,function(k,v){
										spec +='<div class="good-info"><div class="tag-container"><span>NEW</span></div><div class="good-detail-img"><a href=""><img src="'+v.pic+'" alt=""></a></div><div class="good-detail-text"><a href="">'+v.gname+'</a><p class="brand"><a href="">'+v.bname+'</a></p><p class="price"><span class="market-price">¥'+v.marketprice+'</span><span class="sale-price">¥'+v.shopprice+'</span></p></div></div>';
									});
								$("#attr_content").html(attr);
								$('#goods-container').html(spec);
							}
			
						});
					})
				})
			</script>
			<!-- 这儿是为了循环出商品对应的属性及规格 -->
			{{foreach from="$aaa" value="$v"}}
			<div class="addColor">
				<div class="sex-entry">
					<span class="title">{{$v[0]}}:</span>
					{{foreach from="$v['1']" value="$value"}}
					<div class="sex-content" gtvalue="{{$value}}" gids="{{$gids}}" >  <!-- 这儿得添加颜色样式,选中的时候的样式 -->
						<a href="javascript:;" class="tag brand">{{$value}}</a>
					</div>
					{{endforeach}}
				</div>
			</div>
			{{endforeach}}
			<script type="text/javascript">
				// $(function(){
				// 	$(".tavalue").click(function(){
				// 		var gtvalue = $(this).closest(".sex-content").attr("gtvalue");
				// 		var gids = $(this).closest(".sex-content").attr("gids");//目的是为了在异步方法里面做判断
				// 		console.log(gids);
				// 		$.ajax({
				// 			type:"post",
				// 			url:"{{U('getTavalueAjax')}}",
				// 			data:{gtvalue:gtvalue,gids:gids},
				// 			dataType:"json",
				// 			success:function(temp){
								
				// 			}
			
				// 		});
				// 	})
				// })
			</script>
			<!-- 默认 -->
			<div id="sort-pager">
				<a href="" class="sort-type active">默认
				</a>
				<a href="" class="sort-type">最新 
					<span class="iconfont"></span>
				</a>
				<a href="" class="sort-type">价格 
					<span class="iconfont iconf1"></span>
				</a>
				<a href="" class="sort-type">折扣 
					<span class="iconfont iconf1"></span>
				</a>
				<a href="" class="sort-type"> 
					<span class="iconfont iconf2">
						<input type="checkbox" name="" id="">
					</span>
					折扣
				</a>
				<!-- 右边的是分页的,得到后期的分页效果 -->
			</div>
			<!-- 商品展示 -->
			<div id="goods-container">
				<!-- 商品的循环从这儿开始 -->
				{{foreach from="$GoodsData" value="$v"}}
				<div class="good-info">
					<div class="tag-container">
						<span>NEW</span>
					</div>
					<div class="good-detail-img">
						<a href="{{U('Show/index',array('gid'=>$v['gid']))}}"><img src="{{$v['pic']}}" alt=""></a>
					</div>
					<div class="good-detail-text">
						<a href="{{U('Show/index',array('gid'=>$v['gid']))}}">{{$v['gname']}}</a>
						<p class="brand"><a href="">{{$v['bname']}}</a></p>
						<p class="price">
							<span class="market-price">¥{{$v['marketprice']}}</span>
							<span class="sale-price"> ¥{{$v['shopprice']}} </span>
						</p>
					</div>
				</div>
				{{endforeach}}
				<!-- 商品的循环到这儿结束就是一件商品 -->
				<!-- 底下的是效果,出现大图 用js实现 -->
				<!-- <div class="good-info-hide">
					<div class="good-info-main">
						
					</div>
					<div class="good-select-color">
	
					</div>
				</div> -->
			</div>
			<!-- 分页的开始 -->
			<div id="product-pager">
				<span class="total">1 - 13 / 共13件商品</span>
			</div>
			<div id="latest-walk">
				<span>最近浏览的商品</span>
				<div id="latest-walk-goods">
					<div class="goods">
						<!-- 这儿为了效果才引用img,不然的话直接在a里面写图片的路径就行了,图片可以直接读取出来 -->
						<a href=""><img src="./Public/Home/Images/list/5.jpg" alt=""></a>
						<a href="">izzue纯色口袋TEE</a>
						<div class="price">
							<span class="market-price">¥3168</span>
							<span class="sale-price"> ¥869 </span>
						</div>
					</div>
					<div class="goods">
						<!-- 这儿为了效果才引用img,不然的话直接在a里面写图片的路径就行了,图片可以直接读取出来 -->
						<a href=""><img src="./Public/Home/Images/list/5.jpg" alt=""></a>
						<a href="">izzue纯色口袋TEE</a>
						<div class="price">
							<span class="market-price">¥3168</span>
							<span class="sale-price"> ¥869 </span>
						</div>
					</div>
					<div class="goods">
						<!-- 这儿为了效果才引用img,不然的话直接在a里面写图片的路径就行了,图片可以直接读取出来 -->
						<a href=""><img src="./Public/Home/Images/list/5.jpg" alt=""></a>
						<a href="">izzue纯色口袋TEE</a>
						<div class="price">
							<span class="market-price">¥3168</span>
							<span class="sale-price"> ¥869 </span>
						</div>
					</div>
					<div class="goods">
						<!-- 这儿为了效果才引用img,不然的话直接在a里面写图片的路径就行了,图片可以直接读取出来 -->
						<a href=""><img src="./Public/Home/Images/list/5.jpg" alt=""></a>
						<a href="">izzue纯色口袋TEE</a>
						<div class="price">
							<span class="market-price">¥3168</span>
							<span class="sale-price"> ¥869 </span>
						</div>
					</div>
					<div class="goods">
						<!-- 这儿为了效果才引用img,不然的话直接在a里面写图片的路径就行了,图片可以直接读取出来 -->
						<a href=""><img src="./Public/Home/Images/list/5.jpg" alt=""></a>
						<a href="">izzue纯色口袋TEE</a>
						<div class="price">
							<span class="market-price">¥3168</span>
							<span class="sale-price"> ¥869 </span>
						</div>
					</div>
					<div class="goods">
						<!-- 这儿为了效果才引用img,不然的话直接在a里面写图片的路径就行了,图片可以直接读取出来 -->
						<a href=""><img src="./Public/Home/Images/list/5.jpg" alt=""></a>
						<a href="">izzue纯色口袋TEE</a>
						<div class="price">
							<span class="market-price">¥3168</span>
							<span class="sale-price"> ¥869 </span>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>	
</article>
<!-- 底部内容 -->
 {{include file="../Common/footer"}}
 <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <!-- <script type="text/javascript" src="./Public/Home/Js/jquery-1.8.2.min.js"></script> -->
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="./Public/Home/bootstrap-3.3.5/js/bootstrap.min.js"></script>
</body>
</html>
